home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / zipinfo.1 < prev    next >
Text File  |  1995-07-25  |  19KB  |  397 lines

  1.  
  2.  
  3.  
  4.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           zipinfo - list detailed information about a ZIP archive file
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           zzzziiiippppiiiinnnnffffoooo [-1111ssssmmmmllllvvvvhhhhtttt] file[.zip] [filespec ...]
  13.  
  14.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  15.           _f_i_l_e[._z_i_p]  Path of the ZIP archive.  The suffix ``.zip'' is
  16.                       applied if the file specified does not exist.
  17.                       Note that self-extracting ZIP files are
  18.                       supported; just specify the ``.exe'' suffix
  19.                       yourself.
  20.  
  21.           [_f_i_l_e_s_p_e_c]  An optional list of archive members to be
  22.                       processed.  Expressions may be used to match
  23.                       multiple members; be sure to quote expressions
  24.                       that contain characters interpreted by the Unix
  25.                       shell. See PATTERN MATCHING (below) for more
  26.                       details.
  27.  
  28.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  29.           -1  list filenames only, one per line (useful for pipes)
  30.           -s  list zipfile info in short Unix ``ls -l'' format:
  31.               default
  32.           -m  list zipfile info in medium Unix ``ls -l'' format
  33.           -l  list zipfile info in long Unix ``ls -l'' format
  34.           -v  list zipfile information in verbose, multi-page format
  35.           -h  list header line
  36.           -t  list totals for files listed or for all files
  37.  
  38.      PPPPAAAATTTTTTTTEEEERRRRNNNN MMMMAAAATTTTCCCCHHHHIIIINNNNGGGG
  39.           All archive members are listed unless a _f_i_l_e_s_p_e_c is provided
  40.           to specify a subset of the archive members.  The _f_i_l_e_s_p_e_c is
  41.           similar to an egrep expression, and may contain:
  42.  
  43.           *      matches a sequence of 0 or more characters
  44.           ?      matches exactly 1 character
  45.           \nnn   matches the character having octal code nnn
  46.           [...]  matches any single character found inside the
  47.                  brackets; ranges are specified by a beginning
  48.                  character, a hyphen, and an ending character.  If an
  49.                  exclamation point or a carat (`!' or `^') follows the
  50.                  left bracket, then the range of characters matched is
  51.                  complemented with respect to the ASCII character set
  52.                  (that is, anything except the characters inside the
  53.                  brackets is considered a match).
  54.  
  55.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.           _Z_i_p_I_n_f_o lists technical information about a ZIP archive,
  57.           including information file access permissions, encryption
  58.           status, type of compression, version and operating system of
  59.           compressing program, and the like.  The default option is to
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 3/9/94)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  71.  
  72.  
  73.  
  74.           list files in the following format:
  75.  
  76.      -rw-rwl---  1.5 unx    2802 t- defX 11-Aug-91 13:48 perms.2660
  77.  
  78.           The last three fields are clearly the modification date and
  79.           time of the file, and its name.  The case of the filename is
  80.           respected; thus files which come from MS-DOS PKZIP are
  81.           always capitalized.  If the file was zipped with a stored
  82.           directory name, that is also displayed as part of the
  83.           filename.
  84.  
  85.           The second and third fields indicate that the file was
  86.           zipped under Unix with version 1.5 of Zip (a beta version).
  87.           Since it comes from Unix, the file permissions at the
  88.           beginning of the line are printed in Unix format.  The
  89.           uncompressed file-size (2802 in this example) is the fourth
  90.           field.
  91.  
  92.           The fifth field consists of two characters, either of which
  93.           may take on several values.  The first character may be
  94.           either `t' or `b', indicating that Zip believes the file to
  95.           be text or binary, respectively; but if the file is
  96.           encrypted, _Z_i_p_I_n_f_o notes this fact by capitalizing the
  97.           character (`T' or `B').  The second character may also take
  98.           on four values, depending on whether there is an extended
  99.           local header and/or an ``extra field'' associated with the
  100.           file (explained in PKWare's APPNOTE.TXT).  If neither
  101.           exists, the character will be a hyphen (`-'); if there is an
  102.           extended local header but no extra field, `l'; if the
  103.           reverse, `x'; and if both exist, `X'.  Thus the file in this
  104.           example is (apparently) a text file, is not encrypted, and
  105.           has neither an extra field nor an extended local header
  106.           associated with it.  The example below, on the other hand,
  107.           is an encrypted binary file with an extra field:
  108.  
  109.      RWD,R,R     0.9 vms     168 Bx shrk  9-Aug-91 19:15 perms.0644
  110.  
  111.           Extra fields are used by PKWare for authenticity
  112.           verification(?) and possibly other purposes, and by Info-
  113.           ZIP's Zip 1.6 and later to store OS/2, Macintosh and VMS
  114.           file attributes.  This example presumably falls into the
  115.           latter class, then.  Note that the file attributes are
  116.           listed in VMS format.  Other possibilities for the host
  117.           operating system include OS/2 with High Performance File
  118.           System (HPFS), DOS or OS/2 with File Allocation Table (FAT)
  119.           file system, and Macintosh, denoted as follows:
  120.  
  121.      arc,,rw,    1.0 os2    5358 Tl i4:3  4-Dec-91 11:33 longfilename.hpfs
  122.      arc,hid,rdo,sys dos    4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
  123.      --w-------  1.0 mac   17357 bx i8:2  4-May-92 04:02 unzip.macr
  124.  
  125.           File attributes in the first two cases are indicated in a
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 3/9/94)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  137.  
  138.  
  139.  
  140.           DOS-like format, where the file may or may not have its
  141.           archive bit set; may be hidden or not; may be read-write or
  142.           read-only; and may be a system file or not.  If the
  143.           attributes are too long, the version number of the encoding
  144.           software is omitted.  (The information is still available in
  145.           the verbose listing, however.)  Interpretation of Macintosh
  146.           file attributes needs some work yet.
  147.  
  148.           Finally, the sixth field indicates the compression method
  149.           and possible sub-method used.  There are six methods known
  150.           at present:  storing (no compression), reducing, shrinking,
  151.           imploding, tokenizing, and deflating.  In addition, there
  152.           are four levels of reducing (1 through 4); four types of
  153.           imploding (4K or 8K sliding dictionary, and 2 or 3 Shannon-
  154.           Fano trees); and three levels of deflating (fast, normal,
  155.           maximum compression).  _Z_i_p_I_n_f_o represents these methods and
  156.           their sub-methods as follows:  ``stor''; ``re:1,'' ``re:2,''
  157.           etc.; ``shrk''; ``i4:2,'' ``i8:3,'' etc.; ``tokn''; and
  158.           ``defF,'' ``defN,'' and ``defX.''
  159.  
  160.           The medium and long listings are almost identical to the
  161.           short format except that they add information on the file's
  162.           compression.  The medium format indicates the file's
  163.           compression factor as a percentage:
  164.  
  165.      -rw-rwl---  1.5 unx    2802 t- 81% defX 11-Aug-91 13:48 perms.2660
  166.  
  167.           In this example, the file has been compressed by more than a
  168.           factor of five; the compressed data are only 19% of the
  169.           original size.  The long format gives the compressed file's
  170.           size in bytes, instead:
  171.  
  172.      -rw-rwl---  1.5 unx    2802 t-     538 defX 11-Aug-91 13:48 perms.2660
  173.  
  174.           In addition to individual file information, a default
  175.           zipfile listing also includes header and trailer lines:
  176.  
  177.      Archive:  OS2.zip   5453 bytes   5 files
  178.      ,,rw,       1.0 os2     730 b- i4:3 26-Jun-92 23:40 Contents
  179.      ,,rw,       1.0 os2    3710 b- i4:3 26-Jun-92 23:33 makefile.os2
  180.      ,,rw,       1.0 os2    8753 b- i8:3 26-Jun-92 15:29 os2unzip.c
  181.      ,,rw,       1.0 os2      98 b- stor 21-Aug-91 15:34 unzip.def
  182.      ,,rw,       1.0 os2      95 b- stor 21-Aug-91 17:51 zipinfo.def
  183.      5 files, 13386 bytes uncompressed, 4951 bytes compressed:  63%
  184.  
  185.           The header line gives the name of the archive, its total
  186.           size, and the total number of files; the trailer gives the
  187.           number of files listed, their total uncompressed size, and
  188.           their total compressed size (not including any of Zip's
  189.           internal overhead).  If, however, one or more _f_i_l_e_s_p_e_cs are
  190.           provided, the header and trailer lines are not listed.  This
  191.           behavior is also similar to that of Unix's ``ls -l''; it may
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 3/9/94)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  203.  
  204.  
  205.  
  206.           be overridden by specifying the -h and -t options
  207.           explicitly.  In such a case the listing format must also be
  208.           specified explicitly, since -h or -t (or both) in the
  209.           absence of other options implies that ONLY the header or
  210.           trailer line (or both) is listed.  See the EXAMPLES section
  211.           below for a semi-intelligible translation of this nonsense.
  212.  
  213.           The verbose listing is self-explanatory.  It also lists file
  214.           comments and the zipfile comment, if any, and the number of
  215.           bytes of OS/2 extended attributes stored.  Note that the
  216.           latter number will in general NOT match the number given by
  217.           OS/2's ``dir'' command; OS/2 always reports the number of
  218.           bytes required in 16-bit format, whereas _Z_i_p_I_n_f_o always
  219.           reports the 32-bit storage.
  220.  
  221.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT OOOOPPPPTTTTIIIIOOOONNNNSSSS
  222.           Modifying _Z_i_p_I_n_f_o's default behavior via options placed in
  223.           an environment variable can be a bit complicated to explain,
  224.           due to _Z_i_p_I_n_f_o's attempts to handle various defaults in an
  225.           intuitive, yet Unix-like, manner.  Nevertheless, there is
  226.           some underlying logic.  In brief, there are three ``priority
  227.           levels'' of options:  the default options; environment
  228.           options, which can override or add to the defaults; and
  229.           explicit options given by the user, which can override or
  230.           add to either of the above.
  231.  
  232.           The default listing format, as noted above, corresponds
  233.           roughly to the "zipinfo -hst" command (except when
  234.           individual zipfile members are specified).  A user who
  235.           prefers the long-listing format (-l) can make use of the
  236.           _Z_I_P_I_N_F_O environment variable to change this default:
  237.  
  238.                 setenv ZIPINFO -l            Unix C shell
  239.  
  240.                 ZIPINFO=-l; export ZIPINFO   Unix Bourne shell
  241.  
  242.                 set ZIPINFO=-l               OS/2 or MS-DOS
  243.  
  244.                 define ZIPINFO_OPTS "-l"     VMS (quotes for LOWERCASE)
  245.  
  246.           If, in addition, the user dislikes the trailer line,
  247.           _Z_i_p_I_n_f_o's concept of ``negative options'' may be used to
  248.           override the default inclusion of the line.  This is
  249.           accomplished by preceding the undesired option with one or
  250.           more minuses:  e.g., ``-l-t'' or ``--tl'', in this example.
  251.           The first hyphen is the regular switch character, but the
  252.           one before the `t' is a minus sign.  The dual use of hyphens
  253.           may seem a little awkward, but it's reasonably intuitive
  254.           nonetheless:  simply ignore the first hyphen and go from
  255.           there.  It is also consistent with the behavior of the Unix
  256.           command nice(1).
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 3/9/94)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  269.  
  270.  
  271.  
  272.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  273.           To get a basic, short-format listing of the complete
  274.           contents of a ZIP archive ``storage.zip,'' with both header
  275.           and totals lines, use only the archive name as an argument
  276.           to zipinfo:
  277.  
  278.                 _z_i_p_i_n_f_o storage
  279.  
  280.           To produce a basic, long-format listing (not verbose),
  281.           including header and totals lines, use -l:
  282.  
  283.                 _z_i_p_i_n_f_o -l storage
  284.  
  285.           To list the complete contents of the archive without header
  286.           and totals lines, either negate the -h and -t options or
  287.           else specify the contents explicitly:
  288.  
  289.                 _z_i_p_i_n_f_o --h-t storage
  290.  
  291.                 _z_i_p_i_n_f_o storage \*
  292.  
  293.           (where the backslash is required only if the shell would
  294.           otherwise expand the `*' wildcard, as in Unix when globbing
  295.           is turned on--double quotes around the asterisk would have
  296.           worked as well).  To turn off the totals line by default,
  297.           use the environment variable (C shell is assumed here):
  298.  
  299.                 setenv ZIPINFO --t
  300.  
  301.                 _z_i_p_i_n_f_o storage
  302.  
  303.           To get the full, short-format listing of the first example
  304.           again, given that the environment variable is set as in the
  305.           previous example, it is necessary to specify the -s option
  306.           explicitly, since the -t option by itself implies that ONLY
  307.           the footer line is to be printed:
  308.  
  309.                 setenv ZIPINFO --t
  310.  
  311.                 _z_i_p_i_n_f_o -t storage           [only totals line]
  312.  
  313.                 _z_i_p_i_n_f_o -st storage          [full listing]
  314.  
  315.           The -s option, like -m and -l, includes headers and footers
  316.           by default, unless otherwise specified.  Since the
  317.           environment variable specified no footers and that has a
  318.           higher precedence than the default behavior of -s, an
  319.           explicit -t option was necessary to produce the full
  320.           listing.  Nothing was indicated about the header, however,
  321.           so the -s option was sufficient.  Note that both the -h and
  322.           -t options, when used by themselves or with each other,
  323.           override any default listing of member files; only the
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 3/9/94)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))      UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999 AAAAuuuugggg 99992222 ((((vvvv1111....0000))))))))       ZZZZIIIIPPPPIIIINNNNFFFFOOOO((((1111))))
  335.  
  336.  
  337.  
  338.           header and/or footer are printed.  This behavior will be
  339.           more useful when _Z_i_p_I_n_f_o accepts wildcards for the zipfile
  340.           name; one may then summarize the contents of all zipfiles
  341.           with a single command.
  342.  
  343.           To list information on a single file within the archive, in
  344.           medium format, specify the filename explicitly:
  345.  
  346.                 _z_i_p_i_n_f_o -m storage unshrink.c
  347.  
  348.           The specification of any member file, as in this example,
  349.           will override the default header and totals lines; only the
  350.           single line of information about the requested file will be
  351.           printed.  This is intuitively what one would expect when
  352.           requesting information about a single file.  For multiple
  353.           files, it is often useful to know the total compressed and
  354.           uncompressed size; in such cases -t may be specified
  355.           explicitly:
  356.  
  357.                 _z_i_p_i_n_f_o -mt storage "*.[ch] Mak\*
  358.  
  359.           Finally, to get maximal information about the ZIP archive,
  360.           use the verbose option.  It is usually wise to pipe the
  361.           output into a filter such as more(1):
  362.  
  363.                 _z_i_p_i_n_f_o -v storage | more
  364.  
  365.      TTTTIIIIPPPPSSSS
  366.           The author finds it convenient to set up an alias ``ii'' for
  367.           _Z_i_p_I_n_f_o on systems which allow aliases, or else to set up a
  368.           batch file ``ii.bat'' or to rename the executable to
  369.           ``ii.exe'' on systems such as MS-DOS which have no provision
  370.           for aliases.  The ``ii'' usage parallels the common ``ll''
  371.           alias for long listings in Unix, and the similarity between
  372.           the outputs of the two commands was intentional.
  373.  
  374.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  375.           funzip(1), unzip(1), zip(1), zipcloak(1), zipnote(1),
  376.           zipsplit(1)
  377.  
  378.      AAAAUUUUTTTTHHHHOOOORRRR
  379.           Greg Roelofs (also known as Cave Newt).  _Z_i_p_I_n_f_o is partly
  380.           based on S. H. Smith's unzip and contains pattern-matching
  381.           code by J. Kercheval, but mostly it was written from
  382.           scratch.  The OS/2 extra-field code is by Kai Uwe Rommel.
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 3/9/94)
  394.  
  395.  
  396.  
  397.